package psu.kit;

public class ArrayHandler {

    public int handelArray(int[] array) {
        int сountOfZero = 0;
        for (int i = 0; i < array.length; i++) {
            if (array[i] == 0) {
                сountOfZero++;
            } else {
                int tmp = array[i];
                array[i] = array[i - сountOfZero];
                array[i - сountOfZero] = tmp;
            }
        }

        return array.length - сountOfZero;
    }
}

